import { FuncHandle, PickHandle } from "../type";

const funcPickHandle: PickHandle = {

	ruleType: "func",

	canCount: false,

	isNode: false,

	// [canCount=false]
	onlyEnter: (save, origin, str, index, char, length) => {
		const rule = origin.ruleIndexStack.infoCheck;
		const ruleInfo = rule.info;
		if (ruleInfo.ruleType === "func") {
			ruleInfo.ruleData(save, origin, rule, str, index, char, length);
		} else {
			throw new Error("处理程序处理非处理程序数据");
		}
		origin.ruleIndexStack.next();
	},

	enter: (origin, hasRange) => {
	},

	// [canCount=true]
	newExit: (enterBranch) => {
	},

	// [canCount=true]
	reenter: (enterBranch) => {
	},

	exit: (origin, hasRange) => {
	},

	// [isNode=true]
	noodHnalde: (save, origin, rule, str, index, char, length) => {
		return false;
	},

};


export default funcPickHandle;
